<?php

include_once 'autoload.php';
$dbAdapter=new Zend_Db_Adapter_Pdo_Mysql(array(
    'host'=>'localhost',
    'username'=>'root',
    'password'=>'',
    'dbname'=>'gsb_frais'
));
$lesVisiteurs = new Zend_Db_Select($dbAdapter);
$lesVisiteurs->from('visiteur');
$view = new Zend_View();
$view->addScriptPath('.');
$view->setEscape('htmlentities');
$view->setEncoding('ISO-8859-1');

$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_DbSelect($lesVisiteurs));
$paginator->setItemCountPerPage(10);
$currentPage = isset($_GET['page']) ? (int) htmlentities($_GET['page']) : 1;
$paginator->setCurrentPageNumber($currentPage);

$view->paginator = $paginator;
echo $view->render('paginatorView02.php');
?>
